package demo4.mapper;

import demo4.pojo.User;
import demo4.util.IDBUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.sql.Connection;

@Component
public class UserMapper implements IUserMapper{
    @Autowired
    private IDBUtil dbUtil;
    @Override
    public int insert(User user) {
        System.out.println("UserMapper:向user表中插入用户数据....");
        Connection connection  = dbUtil.getConnection();
        System.out.println("UserMapper:执行Insert操作");
        System.out.println("UserMapper:执行完毕，返回影响的条目数");
        return 0;
    }

}
